<?php

namespace App\Http\Middleware;

use Closure;

class Activity
{
    /**
     * 秒杀活动中间件，用于判断活动时候开始，前置操作,以$next($request)为界
     */
    public function handle($request, Closure $next)
    {
        if(time() < strtotime('2017-02-23')){
            return redirect('pro_activity');
        }
        return $next($request);
    }
}